import Vue from 'vue'
import VueRouter from 'vue-router'
import menu from '../views/Menu.vue'
import UserLogin from '../views/UserLogin.vue'
// import Shu from '../views/shu.vue'
import ziyuan from '../views/ziyuan.vue'
import home from '../views/Home.vue'
import iii from '../views/111.vue'
import geren from '../views/geren.vue'
import organization from '../views/organization.vue'
import group from '../views/group.vue'
import staff from '../views/staff.vue'
import content from '../views/content.vue'
import showtask from '../views/show_task.vue'
import news from '../views/news.vue'
import forgetpwd from '../views/forgetpwd.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/menu',
    name: 'menu',
    component: menu,
    children:[
      {
        path: '/ziyuan',
        name: 'ziyuan',
        component: ziyuan
      },
      {
        path: '/home',
        name: 'home',
        component: home
      },
      {
        path: '/geren',
        name: 'geren',
        component: geren
      },
      {
        path: '/organization',
        name: 'organization',
        component: organization
      },
      {
        path: '/group',
        name: 'group',
        component: group
      },
      {
        path: '/staff',
        name: 'staff',
        component: staff
      },
      {
        path: '/content',
        name: 'content',
        component: content
      },
      {
        path: '/showtask',
        name: 'showtask',
        component: showtask
      },
      {
        path: '/news',
        name: 'news',
        component: news
      },
    ]
  },
  {
    path: '/',
    name: 'UserLogin',
    component: UserLogin
  },
  {
    path: '/iii',
    name: 'iii',
    component: iii
  },
  {
    path: '/forgetpwd',
    name: 'forgetpwd',
    component: forgetpwd
  },
  // {
  //   path: '/shu',
  //   name: 'Shu',
  //   component: Shu
  // },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/About.vue')
    }
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
